<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            margin: 0;
        }
        header {
            display: flex;
            width: 100vw;
            height: 50px;
            background-color: cornflowerblue;
        }
        .classification,
        .login {
            width: 50px;
            height: 50px;
            /* 文字的水平垂直居中 */
            line-height: 50px;
            text-align: center;
            color: #fff;
        }
        .search {
            height: 42px;
            border-radius: 21px;
            flex: 1;
            background-color: #fff;
            margin-top: 4px;
            padding: 8px 21px;
            display: flex;
            /* 不让padding把盒子撑大 */
            box-sizing: border-box;
        }
        /* 搜索图标 */
        .search .icon,
        .search .logo {
            width: 42px;
        }
        .search .logo {
            color: red;
            font-size: 32px;
            line-height: 26px;
            font-weight: 700;
            border-right: 1px solid #ccc;
            padding-right: 8px;
        }
        .search .icon {
            line-height: 26px;
            font-size: 32px;
            padding: 0 8px;
        }
        /* 搜索输入框 */
        .search input {
            flex: 1;
            border: none;
            outline: none;
        }
    </style>
</head>
<body>
    <header>
        <!-- 分类按钮 -->
        <div class="classification">图标</div>
        <div class="search">
            <div class="logo">JD</div>
            <div class="icon">图</div>
            <input type="text" placeholder="显卡gtx系列" size="1">
        </div>
        <div class="login">登录</div>
    </header>
</body>
</html>